namespace org.jawk.intermediate
{
	/// <summary>An interface to a tuple position for interpretation.</summary>
	/// <remarks>
	/// An interface to a tuple position for interpretation.
	/// <p>
	/// This is differentiated from a position interface for
	/// compilation because compilation requires linear
	/// access (i.e., non-jumps) to the tuple list, while
	/// interpretation requires this as well as jump capability.
	/// </remarks>
	public interface IPositionForInterpretation : org.jawk.intermediate.IPosition
	{
		/// <summary>Reposition to the tuple located at a particular address.</summary>
		/// <remarks>
		/// Reposition to the tuple located at a particular address.
		/// This is usually done in a response to an if condition.
		/// However, this is also done to perform loops, etc.
		/// </remarks>
		/// <param name="address">The target address for the jump.</param>
		void Jump(org.jawk.intermediate.IAddress address);

		/// <returns>
		/// The current index into the tuple list (queue)
		/// of the tuple located at the current position.
		/// </returns>
		int Current();

		/// <summary>
		/// Reposition to the tuple located at a particular index
		/// into the tuple list (queue)..
		/// </summary>
		/// <remarks>
		/// Reposition to the tuple located at a particular index
		/// into the tuple list (queue)..
		/// </remarks>
		/// <param name="idx">The target index for the jump.</param>
		void Jump(int idx);
	}
}
